﻿namespace App.EntityFramework.Seed
{
    public class InitialDbBuilder
    {
        private readonly WebPlusDbContext _context;

        public InitialDbBuilder(WebPlusDbContext context)
        {
            _context = context;
        }

        public void Create()
        {
            new DefaultButtonsCreator(_context).Create();
            new DefaultMenuPermissionsCreator(_context).Create();
            new HostRoleAndUserCreator(_context).Create();
            new DefaultTenantUserAndRoleCreator(_context).Create();

            _context.SaveChanges();
        }
    }
}
